package com.soboot.system.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Update;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * @Author:
 * @createTime: 2023年01月05日 14:03:11
 * @version:
 * @Description:
 * @Copyright:
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value="MenuSaveReqModel",description = "")
public class MenuSaveReqModel {

    @ApiModelProperty(value = "主键ID")
    @NotNull(message = "主键ID不能为空", groups = {Update.class})
    private Integer id;

    @ApiModelProperty(value = "父资源ID")
    private Integer parentId;

    @ApiModelProperty(value = "资源名称",required = true)
    @NotBlank(message = "资源名称不能为空")
    private String menuName;

    @ApiModelProperty(value = "对应路由地址path")
    private String menuPath;

    @ApiModelProperty(value = "对应路由组件component")
    private String menuComponent;

    @ApiModelProperty(value = "对应路由默认跳转地址redirect")
    private String menuRedirect;

    @ApiModelProperty(value = "权限标识")
    private String menuPerms;

    @ApiModelProperty(value = "资源图标")
    private String menuIcon;

    @ApiModelProperty(value = "资源类型",required = true)
    @NotBlank(message = "类型不能为空")
    private String menuType;

    @ApiModelProperty(value = "资源编码")
    private String menuCode;

    @ApiModelProperty(value = "隐藏",required = true)
    @NotBlank(message = "隐藏不能为空")
    private String menuHidden;

    @ApiModelProperty(value = "排序",required = true)
    @NotNull(message = "排序不能为空")
    private Integer menuSort;

    @ApiModelProperty(value = "状态")
    @Builder.Default
    private String status = "1";

    @ApiModelProperty(value = "备注")
    private String remark;
}
